<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class WorkRelateArticle extends Model
{
    protected $table = "c_work_relate_articles";

    public static function getInfoById($id)
    {
        return self::where([['id', '=', $id]])->first();
    }

    /***
     * @param $param
     * @return mixed
     * 获取工作室已有文章ID
     */
    public static function getArticleIds($param)
    {
        return self::where([['work_id', '=', $param['work_id']]])->pluck("article_id");
    }

}
